﻿#define TRACE
using System.Diagnostics;

namespace ErrorDumper {
    internal static class InternalExceptionHandler {

        public static void HandleSafely(object internalException, object originalException) {
#if DEBUG
            Debugger.Break();
#endif
            try {
                Trace.TraceError("Internal exception of ErrorDumper was occured: {0}\r\nOriginal exception: {1}",
                                 internalException, originalException);
            }
            // ReSharper disable EmptyGeneralCatchClause
            catch { }
            // ReSharper restore EmptyGeneralCatchClause
        }
    }
}
